package model;

import java.io.Serializable;

public class Position implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 7975347691927096073L;
	private int x;
	private int y;
	private String zone;
	
	public int getX() {
		return x;
	}
	public Position(int x, int y, String zone) {
		super();
		this.x = x;
		this.y = y;
		this.zone = zone;
	}
	public int getY() {
		return y;
	}
	public String getZone() {
		return zone;
	}
	public boolean equals(Object o) {

	    if (o instanceof Position) {

	      Position location = (Position) o;

	      if (this.getX() == location.getX() && this.getY() == location.getY() && this.getZone().equals(location. getZone())) return true;

	    }
	    return false;
	  }

	public int hashCode() {

	    return this.getX()+ this.getY() +this.getZone().hashCode();

	  }	
}
